#ifndef _THREAD_H__
#define _THREAD_H__

#include <thread>
#include <functional>


namespace util
{

class Thread
{
    using ThreadFunc = std::function<void (int)>;
public:
    explicit Thread(ThreadFunc func);
    ~Thread() = default;

    void start();

    [[nodiscard]] int tid();

    Thread(Thread&) = delete;
    Thread& operator=(Thread&) = delete;

private:
    static int inline counter_ = 0;
    int tid_;
    ThreadFunc func_;
};

}   /* namespace util */

# endif